package com.cy.model;

import java.util.Date;
import java.util.List;

import com.cy.BasicModel;
import com.cy.ext.plugin.tablebind.TableBind;

@SuppressWarnings("serial")
@TableBind(tableName = "activity_qrcode", pkName = "id")
public class ActivityQRCode extends BasicModel<ActivityQRCode> {
	public static final ActivityQRCode dao = new ActivityQRCode();
	public static final String SELECT_ALL = "`id`, `activity_code`, `qr_code`";
	
	/**
	 * 
	 * @Title: ActivityQRCode
	 * @Description: 获取对应活动的活动二维码
	 * @param: @param activityCode
	 * @param: @return
	 * @return: List<ActivityQRCode>
	 * @throws
	 */
	public List<ActivityQRCode> findQRCode(Integer activityCode){
		String sql = "select a.qr_code from activity_qrcode a left join activity_content b on a.activity_code=b.activity_code where a.activity_code=?";
		return this.find(sql, activityCode);
	}
	
	public ActivityQRCode setId(Integer id){
		this.set("id", id);
		return this;
	}
	
	public Integer getId(){
		return this.get("id");
	}
	
	public ActivityQRCode setActivityCode(Integer code){
		this.set("activity_code", code);
		return this;
	}
	
	public Integer getActivityCode(){
		return this.get("activity_code");
	}
	
	public ActivityQRCode setQrCode(String qrCode){
		this.set("qr_code", qrCode);
		return this;
	}
	
	public String getQrCode(){
		return this.get("qr_code");
	}

	public ActivityQRCode setCreateTime(Date createTime) {
		this.set("create_time", createTime);
		return this;
	}

	public Date getCreateTime() {
		return this.get("create_time");
	}

	public ActivityQRCode setCreateUser(Integer createUser) {
		this.set("create_user", createUser);
		return this;
	}

	public Integer getCreateUser() {
		return this.get("create_user");
	}

	public ActivityQRCode setUpdateTime(Date updateTime) {
		this.set("update_time", updateTime);
		return this;
	}

	public Date getUpdateTime() {
		return this.get("update_time");
	}

	public ActivityQRCode setUpdateUser(Integer updateUser) {
		this.set("update_user", updateUser);
		return this;
	}

	public Integer getUpdateUser() {
		return this.get("update_user");
	}

}
